<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "t_resource_info".
 *
 * @property string $id id
 * @property string $file_id
 * @property string $title 标题
 * @property string $mat_title_en 英文标题
 * @property string $code_number 编码
 * @property string $mat_lang 语言
 * @property string $mat_intro 简介
 * @property int $mat_category 术语分类
 * @property string $keyword 关键词
 * @property string $knowledge 知识点
 * @property string $mat_version 素材版本
 * @property string $mat_audit 审核者
 * @property string $audit_date 审核日期
 * @property string $mat_status 素材状态
 * @property string $mat_publish 发布者
 * @property string $mat_author 素材作者
 * @property string $publish_date 发布日期
 * @property string $mat_master 素材住审
 * @property string $mat_date 编写日期
 * @property string $is_scrom SCORM支持
 * @property int $subject 专业分类
 * @property string $mat_diff 难度
 * @property string $copyright_intro 版权
 * @property string $mat_copyright_intro 版权使用条件说明
 * @property string $body 内容
 * @property string $course_id 所属课程
 * @property string $group_id 所属小组
 * @property string $mat_vote 评价
 * @property string $node_type 结点类型
 * @property string $school_id 学校id
 * @property string $major_id 专业目录id
 * @property string $create_by
 * @property string $create_time
 * @property string $update_by
 * @property string $update_time
 * @property int $del_flag
 * @property string $source 素材来源（原创/网络/教材/其他/不详）
 * @property string $visibility 可见性
 * @property string $mat_type 资源类型
 * @property string $study_require 学习要求
 * @property string $mat_uri 资源路径
 * @property string $img_url 缩略图
 * @property string $publis_way 发布方式
 * @property string $publis_timer 发布定时
 * @property string $mime_type 媒体类型
 * @property string $old_id 对应3.0的资源id
 * @property int $resource 对应3.0的资源来源0本地,1资源库
 * @property string $project_id 联盟id
 */
class TResourceInfo extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 't_resource_info';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id'], 'required'],
            [['mat_category', 'subject', 'del_flag'], 'integer'],
            [['audit_date', 'publish_date', 'mat_date', 'create_time', 'update_time', 'publis_timer'], 'safe'],
            [['copyright_intro', 'body'], 'string'],
            [['id', 'file_id', 'course_id', 'group_id','school_id', 'major_id', 'create_by', 'update_by', 'project_id','old_id'], 'string', 'max' => 36],
            [['title', 'mat_title_en', 'knowledge', 'mat_copyright_intro', 'mat_vote', 'node_type', 'study_require', 'mat_uri', 'img_url'], 'string', 'max' => 255],
            [['code_number', 'mat_lang', 'mat_version', 'mat_audit', 'mat_status', 'mat_publish', 'mat_author', 'mat_master'], 'string', 'max' => 100],
            [['mat_intro'], 'string', 'max' => 2048],
            [['keyword'], 'string', 'max' => 512],
            [['is_scrom', 'mat_diff', 'source', 'visibility', 'mat_type', 'publis_way', 'mime_type'], 'string', 'max' => 64],
            [['id'], 'unique'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'file_id' => 'File ID',
            'title' => 'Title',
            'mat_title_en' => 'Mat Title En',
            'code_number' => 'Code Number',
            'mat_lang' => 'Mat Lang',
            'mat_intro' => 'Mat Intro',
            'mat_category' => 'Mat Category',
            'keyword' => 'Keyword',
            'knowledge' => 'Knowledge',
            'mat_version' => 'Mat Version',
            'mat_audit' => 'Mat Audit',
            'audit_date' => 'Audit Date',
            'mat_status' => 'Mat Status',
            'mat_publish' => 'Mat Publish',
            'mat_author' => 'Mat Author',
            'publish_date' => 'Publish Date',
            'mat_master' => 'Mat Master',
            'mat_date' => 'Mat Date',
            'is_scrom' => 'Is Scrom',
            'subject' => 'Subject',
            'mat_diff' => 'Mat Diff',
            'copyright_intro' => 'Copyright Intro',
            'mat_copyright_intro' => 'Mat Copyright Intro',
            'body' => 'Body',
            'course_id' => 'Course ID',
            'group_id' => 'Group ID',
            'mat_vote' => 'Mat Vote',
            'node_type' => 'Node Type',
            'school_id' => 'school_id',
            'major_id' => 'Major ID',
            'create_by' => 'Create By',
            'create_time' => 'Create Time',
            'update_by' => 'Update By',
            'update_time' => 'Update Time',
            'del_flag' => 'Del Flag',
            'source' => 'Source',
            'visibility' => 'Visibility',
            'mat_type' => 'Mat Type',
            'study_require' => 'Study Require',
            'mat_uri' => 'Mat Uri',
            'img_url' => 'Img Url',
            'publis_way' => 'Publis Way',
            'publis_timer' => 'Publis Timer',
            'mime_type' => 'Mime Type',
            'project_id' => 'Project ID',
        ];
    }
}
